<?php
/**
 * PDebug
 * Debug and log system
 *
 * @author Patrice Ferlet <metal3d@copix.org>
 * @package utils 
 * @license http://opensource.org/licenses/lgpl-3.0.html GNU Lesser General Public License Version 3.0 (LGPLv3)
*/


class PDebug {

    function log($message, $where="display"){
        PDebug::$where($message);
    }

    private function dump($msg){
        var_dump($msg);
    }

    private function display($msg){
        echo "$msg<br />\n";
    }

    private function file($msg){
        $msg = date('r')."\n".$msg;
        file_put_contents("/tmp/logpholow.log", $msg,FILE_APPEND);
    }

    private function dumpToFile($msg){
        $msg = date('r')."\n".var_export($msg,true);
        file_put_contents("/tmp/logpholow.log", $msg,FILE_APPEND);
    }
}
